package com.jiyun.listener;

import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;

@Component
public class MessageMQ {
    @RabbitListener(queuesToDeclare =@Queue("aaa"))
    public void receive(String msg){
        System.out.println("接收到消息："+msg);
    }
}
